<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //filter
    //参数：arr.filter(item,idex,arr)
    //作用：过滤数组，满足条件的留下，返回新的数组
    //返回：返回新的数组
    
    const arr = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']
   const arr1= arr.filter(item=>item.length>6)
   console.log(arr1);
  </script>
</body>
</html>